#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void setN(int n){
	char cmd[255];
	sprintf(cmd, "echo \"#define N %d\" > n.h & sleep 1", n);
	system(cmd);
	//sleep(1);
}

void run(int n){
	//sleep(n*1);
	//printf("NORMAL:\n");
	//system("./normal.sh");

	//sleep(n*1);
	//printf("SSE:\n");
	//system("./sse.sh");
	//sleep(n*1);
	//printf("OPENMP:\n");
	//system("./openmp.sh");
	//sleep(n*1);
	printf("TBB:\n");
	system("g++ ../tbb/main.cpp -ltbb -std=c++0x | ./a.out");

}

int main()
{
	int times[] = {5, 5,25,50,75,100,125,150,200,250,5};
	int i;
	for (i=0;i<11;++i){
		setN(times[i]);
		run(i);
	}
}
